public class D10 {
    // loop and condition
    public static void main(String[] args) {
        int x = 10;
        do {
            System.out.println("value of x: " + x);
            x++;
        } while (x < 20);// when x >= 20, this break out

        for (int i = 10; i < 20; i++) {
            System.out.println("value of i: " + i);
        }

        for (int a : new int[] { 1, 2, 3, 4 }) {
            System.out.println("value of a: " + a);
        }

        String ILoveYou = "If I love you";
        if (ILoveYou.equals("If I love you")) {
            System.out.println("[I do love you]");
        } else if (ILoveYou.contains("love you")) {
            System.out.println("{Maybe I do love you}");
        } else {
            System.out.println("{I just love your money}");
        }

        // switch case
        char grade = 'C';
        switch (grade) {
            case 'A':
                System.out.println("{Nice}");
                break;
            case 'B':
                System.out.println("Damn it");
                break;
            default:
                System.out.println("Son of Bitch");
                break;
        }

    }

}
